Add T7 storage credit docs#503
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
07fc07b to
ff4bfc3
Compare
10c518f to
0b51b09
Compare
0b51b09 to
eaa1d7f
Compare
eaa1d7f to
c696346
Compare
c696346 to
e6e785b
Compare
e6e785b to
4a07eb1
Compare
4a07eb1 to
c8d6e50
Compare
c8d6e50 to
2a49c1a
Compare
2a49c1a to
48dac2e
Compare
48dac2e to
adbbd81
Compare
adbbd81 to
d536b85
Compare
d536b85 to
f5aba70
Compare
legion2002
left a comment
There was a problem hiding this comment.
We should highlight the cost savings of 1067 somewhere with a table. Old transactions could get upto 20x cheaper in dollar terms.
f5aba70 to
697f7e4
Compare
* docs: improve storage credits explanation * fix: typo
# Conflicts: # src/pages/docs/guide/machine-payments/pay-as-you-go.mdx # src/pages/docs/guide/stablecoin-dex/providing-liquidity.mdx
| ::: | ||
|
|
||
| :::info[T7 payment-channel savings] | ||
| The [T7 network upgrade](/docs/protocol/upgrades/t7) adds payer-scoped storage credits for MPP payment channels. When a payer closes or withdraws a finished channel, the reserve can record a channel storage credit for that payer. If the same payer opens another channel later, that payer can reuse the credit. Other payers cannot spend it. |
There was a problem hiding this comment.
| The [T7 network upgrade](/docs/protocol/upgrades/t7) adds payer-scoped storage credits for MPP payment channels. When a payer closes or withdraws a finished channel, the reserve can record a channel storage credit for that payer. If the same payer opens another channel later, that payer can reuse the credit. Other payers cannot spend it. | |
| The [T7 network upgrade](/docs/protocol/upgrades/t7) adds payer-scoped storage credits for MPP payment channels. When a payer closes or withdraws a finished channel, the reserve records a channel storage credit for that payer. If the same payer opens another channel later, that payer reuses the credit. Other payers cannot spend it. |
|
|
||
| In `Refund` mode, storage creations pay upfront. At the end of the transaction, the protocol matches eligible creations with available credits for the same contract, consumes those credits, and applies the gas refund. | ||
|
|
||
| | Action | `Refund` mode behavior | |
There was a problem hiding this comment.
i don't feel like this table helps?
|
|
||
| ## Storage creation benchmark | ||
|
|
||
| The [v1.10.1 release benchmark](https://github.com/tempoxyz/tempo/releases/tag/v1.10.1) shows why this primitive matters. In T6, the TIP-1000 storage creation component cost `250,000` gas. In T7, that component is split into a `5,000` gas residual cost plus a `245,000` gas creditable portion that one storage credit can offset. |
There was a problem hiding this comment.
| The [v1.10.1 release benchmark](https://github.com/tempoxyz/tempo/releases/tag/v1.10.1) shows why this primitive matters. In T6, the TIP-1000 storage creation component cost `250,000` gas. In T7, that component is split into a `5,000` gas residual cost plus a `245,000` gas creditable portion that one storage credit can offset. | |
| The [v1.10.1 release benchmark](https://github.com/tempoxyz/tempo/releases/tag/v1.10.1) shows why this primitive matters. Before T7, the storage creation component cost `250,000` gas due to TIP-1000. In T7, that component is split into a `5,000` gas residual cost plus a `245,000` gas creditable portion that one storage credit can offset. |
|
|
||
| That may be fine for some products. For the StablecoinDEX, the intended behavior is different: if Alice's order lifecycle created the reusable storage benefit, Alice should be able to use that benefit when she places a later order. | ||
|
|
||
| Use user-level accounting when all of these are true: |
There was a problem hiding this comment.
I'm a little confused by this. It seems to suggest that there's just some user-level accounting toggle that you can use, but I don't think that's the case.
| Tempo uses a fixed base fee (rather than a variable base fee as in EIP-1559), set so that a TIP-20 transfer costs less than $0.001. All fees accrue to the validator who proposes the block. | ||
| Tempo currently uses a fixed base fee (rather than a variable base fee as in EIP-1559), set so that a TIP-20 transfer costs less than $0.001. All fees accrue to the validator who proposes the block. | ||
|
|
||
| :::info[Dynamic base fee] |
There was a problem hiding this comment.
Do we want to point out here that dynamic base fees are being introduced in T7?
| # T7 Network Upgrade | ||
|
|
||
| T7 gives partners a clearer fee model for high-volume payment and exchange flows. It adds storage credits for reusable DEX order and TIP-20 channel state, makes the base fee move down when network usage is below the target threshold, and deprecates new TIP-20 rewards. | ||
| T7 makes repeated onchain workflows cheaper and gives partners a clearer fee story for payment and exchange flows. It adds storage savings for DEX order state and TIP-20 payment-channel state, lets the base fee move down when network usage is low, and deprecates new TIP-20 rewards activity. |
There was a problem hiding this comment.
| T7 makes repeated onchain workflows cheaper and gives partners a clearer fee story for payment and exchange flows. It adds storage savings for DEX order state and TIP-20 payment-channel state, lets the base fee move down when network usage is low, and deprecates new TIP-20 rewards activity. | |
| T7 makes repeated onchain workflows cheaper . It adds storage savings for DEX order state and TIP-20 payment-channel state, lets the base fee move down when network usage is low, and deprecates new TIP-20 rewards activity. |
| T7 gives partners a clearer fee model for high-volume payment and exchange flows. It adds storage credits for reusable DEX order and TIP-20 channel state, makes the base fee move down when network usage is below the target threshold, and deprecates new TIP-20 rewards. | ||
| T7 makes repeated onchain workflows cheaper and gives partners a clearer fee story for payment and exchange flows. It adds storage savings for DEX order state and TIP-20 payment-channel state, lets the base fee move down when network usage is low, and deprecates new TIP-20 rewards activity. | ||
|
|
||
| For partners, the headline is simple: apps with repeat contract workflows can pass meaningful gas savings to returning users, MPP sessions can reuse channel-state savings for the same payer, and all users can benefit from lower base fees during quieter network periods. |
There was a problem hiding this comment.
| For partners, the headline is simple: apps with repeat contract workflows can pass meaningful gas savings to returning users, MPP sessions can reuse channel-state savings for the same payer, and all users can benefit from lower base fees during quieter network periods. | |
| Apps with repeat contract workflows can pass meaningful gas savings to returning users, MPP sessions can reuse channel-state savings for the same payer, and all users can benefit from lower base fees during quieter network periods. |
Summary
gas savedDEX benchmark rows, a dynamic base fee savings table, and updated related links/sidebar labels.Implementation PRs and benchmark sources
Validation
pnpm run check:typespnpm run build@wagmi/coreimportingwalletfromviem.api.github.comis blocked, then completes successfully./protocol/upgrades/t7/,/guide/t7-storage-credits/,/guide/machine-payments/, and/guide/machine-payments/pay-as-you-go/.gas savedrows render.Follow-up